<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <!-- 事件修饰符 -->
        <p>
            <div @click='father'>
                <button @click.stop='stop'>按钮</button>
            </div>
            <a href="https://www.baidu.com" @click.prevent='prevent'>baidu</a>
        </p>
    </div>
    <script src="js/vue.js"></script>
    <script>
        const vue = new Vue({
            el: '#app',
            methods: {
                father: function(e) {
                    console.log(e.target);
                },
                stop: function(e) {
                    // e.stopPropagation();
                },
                prevent: function(e) {
                    // e.preventDefault();
                },
            }
        });
    </script>
</body>

</html>